﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ComeSeeThis_MVC2.Models.GearingRec>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Browse
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Browse</h2>
    <table>
        <tr>
        <th></th>
            <th>
                VehicleId
            </th>
            <th>
                VehicleType
            </th>
            <th>
                MotorId
            </th>
            <th>
                Man Rec'd
            </th>
            <th>
                Pinion
            </th>
            <th>
                Spur
            </th>
            <th>
                FDR
            </th>
            <th>
                TrackSizeId
            </th>
            <th>
                TrackSurfaceId
            </th>
            <th>
                CellTypeId
            </th>
            <th>
                CellCount
            </th>
            <th>
                MotorTemps
            </th>
            <th>
                MotorTiming
            </th>
            <th>
                EscTimingAdvance
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <%--            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.GearingRecId }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.GearingRecId })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.GearingRecId })%>
            </td>
            --%>
            <td>
                <%: item.GearingRecId %>
            </td>
            <td>
                <% if (item.VehicleId != null)
                   {%>
                <%:item.Vehicle.Company.CompanyName%>
                <%:item.Vehicle.VehicleName%>
                <%
                    }%>
            </td>
            <td>
                <%: item.VehicleType.VehicleTypeName %>
            </td>
            <td>
                <%: item.Motor.Company.CompanyName %> <%: item.Motor.MotorName %>
            </td>
            <td>
                <%: item.ManufacturerRecommended %>
            </td>
            <td>
                <%: item.Pinion %>
            </td>
            <td>
                <%: item.Spur %>
            </td>
            <td>
                <%: String.Format("{0:F}", item.FDR) %>
            </td>
            <td>
                <%: item.TrackSize.TrackSizeName %>
            </td>
            <td>
                <%: item.TrackSurface.TrackSurfaceName %>
            </td>
            <td>
                <%: item.CellType.CellTypeName %>
            </td>
            <td>
                <%: item.CellCount %>
            </td>
            <td>
                <%: item.MotorTemps %>
            </td>
            <td>
                <%: item.MotorTiming %>
            </td>
            <td>
                <%: String.Format("{0:F}", item.EscTimingAdvance) %>
            </td>
        </tr>
        <% } %>
    </table>
    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="BodyTagContent" runat="server">
</asp:Content>
